#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
	int searchInsert(vector<int>& nums, int target) {
		auto it = find_if(nums.begin(), nums.end(), [&](int n) {return n >= target; });
		return it - nums.begin();
	}
};
int main()
{
	vector<int> v{ 1,3,5,6 };
	Solution sol;
	cout << sol.searchInsert(v, 5) << endl;
	cout << sol.searchInsert(v, 2) << endl;
	cout << sol.searchInsert(v, 7) << endl;
	cout << sol.searchInsert(v, 0) << endl;
	
}